(* ListCr.pp *)

unit ListCr;

interface

uses nodes;

var
   head	: link;

procedure NodeIns(a : node); 

implementation

procedure NodeIns(a : node);
var
   q : link;
begin
   new(q); 
   if head = nil then
   begin (* wstawianie do listy pustej lub po head *)
      head := q;
      head^.item := a.item;
      head^.next := head;
   end
   else
   begin
      q^.item := a.item;
      q^.next := head^.next;
head^.next := q; 
   end;
end; { NodeIns }

end.
